From d02ef3f71408946ee647c871317ad3488f3d48ec Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Tue, 13 Aug 2024 12:11:37 -0500 Subject: [PATCH] Have a separate module for forms --- src/pgwui_copy/views/copy.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/pgwui_copy/views/copy.py b/src/pgwui_copy/views/copy.py index 7978e83..86436fc 100644 --- a/src/pgwui_copy/views/copy.py +++ b/src/pgwui_copy/views/copy.py @@ -34,13 +34,11 @@ from wtforms import ( from pyramid.view import view_config +import pgwui_core.forms import pgwui_core.utils from pgwui_core.core import ( UploadEngine, NoTransactionEngine, - UserInitialPost, - UserWTForm, - CredsLoadedForm, SessionDBHandler, LogSQLCommand, SQLData, @@ -65,7 +63,7 @@ log = logging.getLogger(__name__) @attr.s -class CopySchemaInitialPost(UserInitialPost): +class CopySchemaInitialPost(pgwui_core.forms.UserInitialPost): '''Get values from settings when there's not user-supplied values in POST ''' @@ -84,7 +82,7 @@ class CopySchemaInitialPost(UserInitialPost): return self -class CopySchemaWTForm(UserWTForm): +class CopySchemaWTForm(pgwui_core.forms.UserWTForm): '''The wtform used to connect to the "gombemi" db to authenticate .''' # We don't actually use the labels, wanting the template to # look (and render) like html, but I'll define them anyway @@ -97,7 +95,7 @@ class CopySchemaWTForm(UserWTForm): @attr.s -class CopySchemaForm(CredsLoadedForm): +class CopySchemaForm(pgwui_core.forms.CredsLoadedForm): ''' Acts like a dict, but with extra methods. -- 2.34.1